{!! admin_css('vendor/dcat-admin/dcat/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css?v2.2.2-beta') !!}
{!! admin_css('vendor/dcat-admin/dcat/plugins/select/select2.min.css?v2.2.2-beta') !!}
{!! admin_css('vendor/dcat-admin/dcat/extra/upload.css?v2.2.2-beta') !!}

<div class="content-body fitness-form" id="app">
    <div class="row">
        <div class="col-md-12">


                <div class="card">
                    <!-- 头部 -->
                    <div class="box-header with-border mb-1" style="padding: .65rem 1rem">
                        <h3 class="box-title" style="line-height:30px;">{{ $user->name }}消费记录 / 余额: <b class="text-success">{{ $balance->balance }}</b>元</h3>
                        <div class="pull-right">
                            <div class="btn-group pull-right" style="margin-right: 5px">
                                <a href="#" class="btn btn-sm btn-primary "><i class="feather icon-list"></i><span
                                        class="d-none d-sm-inline">&nbsp;列表</span></a>
                            </div>
                        </div>
                    </div>

                    <!-- body -->
                    <div class="box-body" style="margin-top: 6px">
                        <div class="fields-group">
                            <div class="row">

                                <table class="table table-striped">
                                    <tr>
                                        <th>消费日期</th>
                                        <th>消费项目</th>
                                        <th>消费金额</th>
                                        <th>卡余额</th>
                                        <th>服务人员</th>
                                        <th>退回</th>
                                    </tr>
                                    @foreach($flow as $v)
                                        <tr>
                                            <td>{{ $v->created_at }}</td>
                                            <td>{{ $v->title }}</td>
                                            <td>
                                                @if($v->type == 0)
                                                    <b class="text-success">+{{ $v->balance }}</b>
                                                @else
                                                    <b class="text-danger">-{{ $v->balance }}</b>
                                                @endif
                                            </td>
                                            <td>{{ $v->balance_rest }}</td>
                                            <td>{{ $v->operator }}</td>
                                            <td><a class="text-danger" onclick="return confirm('确认退回？');" href="user_balance_flow/delete?id={{$v->id}}&user_id={{$user->id}}">退回</a></td>
                                        </tr>
                                    @endforeach
                                </table>

                            </div>

                        </div>

                        <!-- Footer -->
                        <div class="box-footer">
                            <div class="col-md-12">
                                <div class="btn-group pull-right">
                                    <button class="btn btn-primary submit"><i class="feather icon-save"></i> 提交</button>
                                </div>
                                <div class="btn-group pull-left">

                                </div>
                            </div>
                        </div>
                    </div>
                </div>

        </div>
    </div>
</div>

{{--<script>--}}
{{--    Dcat.init('#form-fitness .field_birthday._normal_', function (self) {--}}
{{--        self.datetimepicker({"format": "YYYY-MM-DD", "locale": "zh_CN", "allowInputToggle": true});--}}
{{--    });--}}
{{--</script>--}}


{!! admin_js('vendor/dcat-admin/dcat/plugins/layer/layer.js?v2.2.2-beta') !!}
{!! admin_js('vendor/dcat-admin/dcat/plugins/jquery.initialize/jquery.initialize.min.js?v2.2.2-beta') !!}
{!! admin_js('vendor/dcat-admin/dcat/plugins/moment/moment-with-locales.min.js?v2.2.2-beta') !!}
{!! admin_js('vendor/dcat-admin/dcat/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js?v2.2.2-beta') !!}
{!! admin_js('vendor/dcat-admin/dcat/plugins/select/select2.full.min.js?v2.2.2-beta') !!}


